package com.lyj.service.impl;

import com.lyj.mapper.DocumentMapper;
import com.lyj.pojo.Document;
import com.lyj.service.DocumentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DocumentServiceImpl implements DocumentService {
    @Autowired
    private DocumentMapper documentMapper;

    @Override
    public List<Document> findAllDocument(Document document) {
        return documentMapper.findAllDocument(document);
    }

    @Override
    public void addDocument(Document document) {
        documentMapper.addDocument(document);
    }

    @Override
    public Document findDocumentById(Integer id) {

        return documentMapper.findDocumentById(id);
    }

    @Override
    public void deleteDocumentById(Integer id) {
        documentMapper.deleteDocumentById(id);
    }
}
